package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.ims.data.entityenum.EnumMenuOwnType;
import com.hq.mybatis.base.BaseModel;
import com.hq.web.penum.EnumMenuType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * jiang bai ping
 *
 * @Email 526666031@qq.com
 * @Detail 权限点
 */
@Data
@Alias("PermissionMenu")
@TableName(value = "permission_menu")
@ApiModel(value = "权限点")
public class PermissionMenu extends BaseModel<PermissionMenu> implements Serializable {

    @ApiModelProperty(value = "id标识")
    @TableId(value = "`permission_menu_id`", type = IdType.ASSIGN_UUID)
    private String permissionMenuId;

    @ApiModelProperty(value = "创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "`create_date_time`", fill = FieldFill.INSERT)
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "更新时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "`update_date_time`", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateDateTime;

    @ApiModelProperty(value = "创建人名称")
    @TableField(value = "`create_user_name`", fill = FieldFill.INSERT)
    private String createUserName;

    @ApiModelProperty(value = "更新人名称")
    @TableField(value = "`update_user_name`", fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;

    @ApiModelProperty(value = "权限点名称")
    @TableField(value = "`menu_name`")
    private String menuName;

    @ApiModelProperty(value = "父id(如果为本身该字段为0)")
    @TableField(value = "`parent_id`")
    private String parentId;

    @ApiModelProperty(value = "根id")
    @TableField(value = "`root_id`")
    private String rootId;

    @ApiModelProperty(value = "级别")
    @TableField(value = "`level`")
    private Integer level;

    @ApiModelProperty(value = "排序字段")
    @TableField(value = "`order_number`")
    private Integer orderNumber;

    @ApiModelProperty(value = "是否允许编辑")
    @TableField(value = "`is_allow_edit`")
    private Boolean isAllowEdit;

    @ApiModelProperty(value = "额外传给前端的参数")
    @TableField(value = "`page_param`")
    private String pageParam;

    @ApiModelProperty(value = "权限点前端路由标识")
    @TableField(value = "`page_key`")
    private String pageKey;

    @ApiModelProperty(value = "是否删除")
    @TableField(value = "`is_del`")
    private Boolean isDel;

    @ApiModelProperty(value = "菜单类型")
    @TableField(value = "`type`")
    private EnumMenuType type;

    @ApiModelProperty(value = "图标")
    @TableField(value = "`icon`")
    private String icon;

    @ApiModelProperty(value = "备注")
    @TableField(value = "`remark`")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @TableField(value = "`version`")
    private Integer version;

    @ApiModelProperty(value = "app表单key")
    @TableField(value = "`app_page_key`")
    private String appPageKey;

    @ApiModelProperty(value = "菜单归属类型")
    @TableField(value = "`own_type`")
    private EnumMenuOwnType ownType;

    @ApiModelProperty(value = "路由地址")
    @TableField(value = "`route_path`")
    private String routePath;

    @ApiModelProperty(value = "路由名称")
    @TableField(value = "`route_name`")
    private String routeName;

    @ApiModelProperty(value = "组件地址")
    @TableField(value = "`component_path`")
    private String componentPath;

    @ApiModelProperty(value = "是否显示")
    @TableField(value = "`is_show`")
    private Boolean isShow;
}
